<?xml version="1.0"?>
<component name="org.nuxeo.ecm.user.center.profile.commandline.override">

  <require>org.nuxeo.ecm.user.center.profile.commandline</require>

  <extension point="command" target="org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent">

    <command enabled="true" name="resizeAvatar">
      <commandLine>convert</commandLine>
      <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet #{sourceFilePath}[0] jpg:- | convert - -resize #{targetWidth}x#{targetHeight}&gt; #{targetFilePath}</parameterString>
      <winParameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet #{sourceFilePath}[0] -resize #{targetWidth}x#{targetHeight}&gt; #{targetFilePath}</winParameterString>
      <installationDirective>You need to install ImageMagick.</installationDirective>
    </command>

  </extension>

</component>
